// banners.jsx — Composer OS banners, Rivian-style landscapes
// No instruments. Each banner uses 3 palette colors + differs in composition/mood.
// Real hero objects will be dropped in later by designer.

const PALETTE = {
  burgundy:   '#8b4a52',
  ochre:      '#c59a5b',
  sage:       '#a7a878',
  moss:       '#6d8b7a',
  teal:       '#6d8a94',
  steel:      '#748ba3',
  lavender:   '#8f87a6',
  plum:       '#6b5d7a',
  terracotta: '#b26f5c',
  coral:      '#c48a7a',
  taupe:      '#8a7a6f',
  stone:      '#7a8289',
};

const PAPER = '#f2efe8';
const INK   = '#1c1a17';
const INK_SOFT = 'rgba(28,26,23,0.74)';
const INK_MUTE = 'rgba(28,26,23,0.58)';
const LINE = 'rgba(28,26,23,0.12)';

const mix = (hex, withHex, t) => {
  const p = (h) => [1,3,5].map(i=>parseInt(h.slice(i,i+2),16));
  const [r1,g1,b1]=p(hex), [r2,g2,b2]=p(withHex);
  const r=Math.round(r1+(r2-r1)*t),g=Math.round(g1+(g2-g1)*t),b=Math.round(b1+(b2-b1)*t);
  return `rgb(${r},${g},${b})`;
};
const tint  = (hex,t)=>mix(hex,'#ffffff',t);
const shade = (hex,t)=>mix(hex,'#000000',t);

// ── grain ────────────────────────────────────────────────
function Grain({opacity=0.05}){
  const svg=`<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.1  0 0 0 0 0.1  0 0 0 0 0.1  0 0 0 1 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='${opacity}'/></svg>`;
  return <div style={{position:'absolute',inset:0,backgroundImage:`url("data:image/svg+xml;utf8,${encodeURIComponent(svg).replace(/%25/g,'%')}")`,mixBlendMode:'multiply',pointerEvents:'none'}}/>;
}

// ═════════════════════════════════════════════════════════
// Landscape — takes three palette colors: sky, rock, ground
// Each banner passes a different combination.
// Composition variants differ in mountain shape, sun position, etc.
// ═════════════════════════════════════════════════════════
function Landscape({
  skyColor, rockColor, groundColor,
  composition = 'desert',  // 'desert' | 'plateau' | 'valley' | 'dunes' | 'alpine' | 'coast'
  sunPos = {x: 1480, y: 280, r: 130},
  sunColor,
  mood = 'warm',           // warm / cool / dusk
}) {
  const sky = mood==='dusk'
    ? { top: shade(skyColor,0.4), bot: tint(skyColor,0.2) }
    : mood==='cool'
    ? { top: tint(skyColor,0.78), bot: tint(skyColor,0.45) }
    : { top: tint(skyColor,0.85), bot: tint(skyColor,0.55) };

  const farRock   = tint(rockColor, 0.1);
  const midRock   = shade(rockColor, 0.1);
  const nearRock  = shade(rockColor, 0.3);
  const groundTop = tint(groundColor, 0.1);
  const groundBot = shade(groundColor, 0.25);
  const sunFill   = sunColor || tint(skyColor, 0.6);
  const uid = (skyColor+rockColor+groundColor+composition).replace(/[^a-z0-9]/gi,'');

  // composition variants
  const paths = {
    desert: {
      far:  'M0,440 Q220,380 420,420 Q620,460 820,400 Q1020,360 1220,420 Q1420,470 1620,410 Q1780,370 1920,420 L1920,800 L0,800 Z',
      midGroup: (
        <g fill={midRock}>
          <path d="M260,540 Q300,430 400,430 Q520,430 560,520 Q600,540 630,560 Q650,580 610,600 L280,610 Q240,590 260,540 Z"/>
          <path d="M1040,560 Q1100,470 1180,470 Q1280,475 1320,555 Q1360,575 1380,600 L1050,615 Q1010,595 1040,560 Z"/>
          <path d="M1520,580 Q1560,510 1640,510 Q1720,515 1760,580 L1540,620 Q1500,605 1520,580 Z"/>
        </g>
      ),
      near: 'M0,640 Q220,620 440,635 Q660,650 880,630 Q1100,610 1320,640 Q1540,665 1740,635 Q1860,625 1920,635 L1920,800 L0,800 Z',
      ground: 'M0,710 L1920,690 L1920,800 L0,800 Z',
    },
    plateau: {
      far:  'M0,460 L280,460 L380,380 L720,380 L820,460 L1200,460 L1320,400 L1600,400 L1720,460 L1920,460 L1920,800 L0,800 Z',
      midGroup: (
        <g fill={midRock}>
          <path d="M100,560 L280,560 L310,500 L520,500 L560,560 L700,560 L700,640 L100,640 Z"/>
          <path d="M1120,580 L1320,580 L1360,530 L1540,530 L1580,580 L1700,580 L1700,650 L1120,650 Z"/>
        </g>
      ),
      near: 'M0,660 L420,660 L460,630 L900,630 L950,660 L1340,660 L1380,640 L1780,640 L1820,660 L1920,660 L1920,800 L0,800 Z',
      ground: 'M0,710 L1920,700 L1920,800 L0,800 Z',
    },
    valley: {
      far:  'M0,500 Q240,380 480,440 Q680,500 780,360 Q880,240 1020,360 Q1160,480 1380,420 Q1600,360 1920,460 L1920,800 L0,800 Z',
      midGroup: (
        <g fill={midRock}>
          <path d="M0,600 Q200,480 420,560 Q580,620 620,560 Q660,500 720,580 Q780,660 900,620 L900,720 L0,720 Z"/>
          <path d="M1080,620 Q1240,520 1400,580 Q1560,640 1720,560 Q1820,520 1920,580 L1920,720 L1080,720 Z"/>
        </g>
      ),
      near: 'M0,700 Q320,670 640,695 Q960,720 1280,690 Q1600,660 1920,700 L1920,800 L0,800 Z',
      ground: 'M0,740 L1920,735 L1920,800 L0,800 Z',
    },
    dunes: {
      far:  'M0,520 Q480,420 960,500 Q1440,580 1920,480 L1920,800 L0,800 Z',
      midGroup: (
        <g fill={midRock}>
          <path d="M0,620 Q400,540 800,610 Q1200,680 1600,600 Q1800,570 1920,610 L1920,720 L0,720 Z"/>
        </g>
      ),
      near: 'M0,700 Q380,660 760,690 Q1140,720 1520,680 Q1760,660 1920,690 L1920,800 L0,800 Z',
      ground: 'M0,730 Q520,720 1000,725 Q1480,730 1920,720 L1920,800 L0,800 Z',
    },
    alpine: {
      far:  'M0,520 L240,300 L380,440 L560,260 L760,440 L940,230 L1160,440 L1360,310 L1580,460 L1760,320 L1920,450 L1920,800 L0,800 Z',
      midGroup: (
        <g fill={midRock}>
          <path d="M100,640 L300,440 L500,640 Z"/>
          <path d="M640,660 L860,430 L1060,660 Z"/>
          <path d="M1200,660 L1380,470 L1560,660 Z"/>
          <path d="M1680,660 L1820,520 L1920,660 L1920,700 L1680,700 Z"/>
        </g>
      ),
      near: 'M0,680 Q300,660 600,675 Q900,690 1200,665 Q1500,640 1920,680 L1920,800 L0,800 Z',
      ground: 'M0,730 L1920,720 L1920,800 L0,800 Z',
    },
    coast: {
      far:  'M0,480 Q400,440 800,470 Q1200,500 1600,460 Q1800,440 1920,460 L1920,800 L0,800 Z',
      midGroup: (
        <g fill={midRock}>
          <ellipse cx="340" cy="600" rx="220" ry="70"/>
          <ellipse cx="960" cy="590" rx="280" ry="60"/>
          <ellipse cx="1620" cy="610" rx="240" ry="65"/>
        </g>
      ),
      near: 'M0,680 Q400,670 800,685 Q1200,700 1600,680 Q1800,672 1920,685 L1920,800 L0,800 Z',
      ground: 'M0,740 L1920,735 L1920,800 L0,800 Z',
    },
  };

  const p = paths[composition] || paths.desert;

  return (
    <svg width="1920" height="800" viewBox="0 0 1920 800"
      preserveAspectRatio="xMidYMid slice"
      style={{position:'absolute',inset:0,display:'block'}}>
      <defs>
        <linearGradient id={`sky-${uid}`} x1="0" y1="0" x2="0" y2="1">
          <stop offset="0" stopColor={sky.top}/>
          <stop offset="1" stopColor={sky.bot}/>
        </linearGradient>
        <radialGradient id={`sun-${uid}`} cx="0.35" cy="0.35" r="0.7">
          <stop offset="0" stopColor={tint(sunFill,0.45)}/>
          <stop offset="0.6" stopColor={sunFill}/>
          <stop offset="1" stopColor={shade(sunFill,0.2)}/>
        </radialGradient>
        <linearGradient id={`ground-${uid}`} x1="0" y1="0" x2="0" y2="1">
          <stop offset="0" stopColor={groundTop}/>
          <stop offset="1" stopColor={groundBot}/>
        </linearGradient>
      </defs>
      <rect width="1920" height="800" fill={`url(#sky-${uid})`}/>
      {/* sun */}
      <circle cx={sunPos.x} cy={sunPos.y} r={sunPos.r} fill={`url(#sun-${uid})`} opacity="0.92"/>
      {/* far layer */}
      <path d={p.far} fill={farRock} opacity="0.88"/>
      {/* mid layer */}
      {p.midGroup}
      {/* near layer */}
      <path d={p.near} fill={nearRock}/>
      {/* ground */}
      <path d={p.ground} fill={`url(#ground-${uid})`}/>
      {/* ground stripes */}
      <g stroke={shade(groundColor,0.4)} strokeWidth="1" opacity="0.18">
        <line x1="0" y1="745" x2="1920" y2="740"/>
        <line x1="0" y1="770" x2="1920" y2="765"/>
      </g>
    </svg>
  );
}

// ── Shell ────────────────────────────────────────────────
function Shell({ children, bg }) {
  return (
    <div style={{
      position:'relative', width:1920, height:800, overflow:'hidden',
      background: bg || PAPER,
      fontFamily:"'Inter Tight', 'Inter', -apple-system, sans-serif",
      color: INK,
    }}>
      {children}
      <Grain opacity={0.055}/>
    </div>
  );
}

// ── Nav ──────────────────────────────────────────────────
// Minimal: logo on the left only. CTAs live in the site header and footer.

// Inline Orbit mark — matches orbit-mark.jsx geometry. `accent` paints the
// disc; `onDark` flips the ring+S to a light or dark tint to stay legible.
function NavOrbitMark({ size = 26, accent = '#7a9b7e', onDark = false }) {
  const cx = 512, cy = 512, r = 320;
  const ringR = r * 0.52;
  const sw = r * 0.075;
  const a1 = (135 * Math.PI) / 180;
  const a2 = (-45 * Math.PI) / 180;
  const p1 = { x: cx + ringR * Math.cos(a1), y: cy + ringR * Math.sin(a1) };
  const p2 = { x: cx + ringR * Math.cos(a2), y: cy + ringR * Math.sin(a2) };
  const reachX = ringR * 1.15;
  const c1 = { x: p1.x + reachX, y: p1.y };
  const c2 = { x: p2.x - reachX, y: p2.y };
  const sPath = `M ${p1.x} ${p1.y} C ${c1.x} ${c1.y}, ${c2.x} ${c2.y}, ${p2.x} ${p2.y}`;
  const uid = `nm-${accent.replace('#','')}`;
  // Match the website-nav OrbitIcon: warm cream paper bg, tone disc.
  return (
    <svg width={size} height={size} viewBox="0 0 1024 1024" style={{display:'block'}}>
      <defs>
        <linearGradient id={`${uid}-paper`} x1="0" y1="0" x2="0" y2="1">
          <stop offset="0" stopColor="#faf8f5"/>
          <stop offset="1" stopColor="#ebe6d9"/>
        </linearGradient>
        <linearGradient id={`${uid}-disc`} x1="0.3" y1="0" x2="0.7" y2="1">
          <stop offset="0" stopColor={accent}/>
          <stop offset="1" stopColor={shade(accent, 0.22)}/>
        </linearGradient>
        <radialGradient id={`${uid}-inner`} cx="0.5" cy="0.5" r="0.5">
          <stop offset="0.55" stopColor={shade(accent,0.22)} stopOpacity="0"/>
          <stop offset="0.95" stopColor={shade(accent,0.5)}  stopOpacity="0.18"/>
          <stop offset="1"    stopColor={shade(accent,0.5)}  stopOpacity="0.32"/>
        </radialGradient>
      </defs>
      <rect width="1024" height="1024" fill={`url(#${uid}-paper)`}/>
      <circle cx={cx} cy={cy} r={r + 18} fill={accent} opacity="0.06"/>
      <circle cx={cx} cy={cy} r={r} fill={`url(#${uid}-disc)`}/>
      <circle cx={cx} cy={cy} r={r} fill={`url(#${uid}-inner)`}/>
      <g fill="none" stroke="#faf8f5" strokeWidth={sw} strokeLinecap="round">
        <circle cx={cx} cy={cy} r={ringR}/>
        <path d={sPath}/>
      </g>
    </svg>
  );
}

function Nav({ onDark=false, active, accent='#8b4a52' }) {
  const c = onDark ? '#f2efe8' : INK;
  return (
    <div style={{position:'absolute',top:0,left:0,right:0,height:80,
      display:'flex',alignItems:'center',justifyContent:'space-between',
      padding:'0 72px',zIndex:5}}>
      <div style={{display:'flex',alignItems:'center',gap:14}}>
        <div style={{width:26,height:26,borderRadius:6,overflow:'hidden',
          boxShadow:`0 0 0 0.5px ${onDark?'rgba(255,255,255,0.18)':'rgba(0,0,0,0.12)'},
            0 1px 2px ${onDark?'rgba(0,0,0,0.4)':'rgba(0,0,0,0.08)'}`}}>
          <NavOrbitMark size={26} accent={accent} onDark={onDark}/>
        </div>
        <div style={{fontSize:20,fontWeight:500,letterSpacing:-0.4,color:c}}>
          Composer<span style={{opacity:0.55}}>OS</span>
        </div>
      </div>
    </div>
  );
}

// ── Eyebrow ──────────────────────────────────────────────
function Eyebrow({num,label,tone,onDark}) {
  const c = onDark ? 'rgba(242,239,232,0.7)' : INK_SOFT;
  return (
    <div style={{display:'flex',alignItems:'center',gap:14,
      fontFamily:"'JetBrains Mono', ui-monospace, monospace",
      fontSize:14,letterSpacing:2,textTransform:'uppercase',color:c}}>
      <span style={{color: onDark?tint(tone,0.4):shade(tone,0.15), fontWeight:600}}>{num}</span>
      <span style={{width:32,height:1,background:c,opacity:0.5}}/>
      <span>{label}</span>
    </div>
  );
}

// Placeholder box for hero object (designer drops real art here later)
function HeroPlaceholder({ w=380, h=260, x=0, y=0, note, rotate=0, tone='#8a7a6f' }) {
  return (
    <div style={{
      position:'absolute', left:x, top:y, width:w, height:h,
      transform:`rotate(${rotate}deg)`,
      border:`1.5px dashed rgba(242,239,232,0.7)`,
      background:`repeating-linear-gradient(45deg, transparent 0 14px, rgba(242,239,232,0.08) 14px 15px)`,
      borderRadius:4, zIndex:3,
      display:'flex', alignItems:'flex-end', padding:14,
      fontFamily:"'JetBrains Mono',monospace", fontSize:11, letterSpacing:1.5,
      color:'rgba(242,239,232,0.85)', textTransform:'uppercase',
      backdropFilter:'blur(1px)',
    }}>
      <div>
        <div style={{opacity:0.6, marginBottom:4}}>hero object</div>
        <div>{note}</div>
      </div>
    </div>
  );
}

// ═════════════════════════════════════════════════════════
// 00 — HERO BANNER
// Colors: ochre (sky) + burgundy (rock) + taupe (ground)
// Composition: desert, warm dusk
// ═════════════════════════════════════════════════════════
function HeroBanner({ tone = PALETTE.moss }) {
  // Greens + light blue: teal sky + moss mid + sage ground
  const sky = PALETTE.teal;
  const mid = PALETTE.moss;
  const ground = PALETTE.sage;
  const skyTop = tint(sky, 0.72);
  const skyBot = tint(sky, 0.92);
  return (
    <Shell bg={skyTop}>
      {/* Open-space landscape — no sun, horizontal layering, very wide */}
      <svg width="1920" height="800" viewBox="0 0 1920 800"
        preserveAspectRatio="xMidYMid slice"
        style={{position:'absolute',inset:0,display:'block'}}>
        <defs>
          <linearGradient id="heroSky" x1="0" y1="0" x2="0" y2="1">
            <stop offset="0" stopColor={skyTop}/>
            <stop offset="0.65" stopColor={tint(sky,0.88)}/>
            <stop offset="1" stopColor={skyBot}/>
          </linearGradient>
          <linearGradient id="heroGround" x1="0" y1="0" x2="0" y2="1">
            <stop offset="0" stopColor={tint(ground,0.2)}/>
            <stop offset="1" stopColor={shade(ground,0.2)}/>
          </linearGradient>
        </defs>
        {/* open sky */}
        <rect width="1920" height="800" fill="url(#heroSky)"/>
        {/* wispy horizontal clouds */}
        <g className="hero-clouds" opacity="0.55" fill={tint(sky,0.95)}>
          <ellipse cx="220" cy="260" rx="180" ry="10"/>
          <ellipse cx="540" cy="210" rx="260" ry="8"/>
          <ellipse cx="960" cy="285" rx="300" ry="9"/>
          <ellipse cx="1460" cy="230" rx="240" ry="7"/>
          <ellipse cx="1760" cy="280" rx="160" ry="9"/>
        </g>
        {/* far distant horizon — faint ridge */}
        <path d="M0,540 Q320,525 640,535 Q960,545 1280,530 Q1600,520 1920,535 L1920,560 L0,560 Z"
          fill={tint(mid,0.55)} opacity="0.8"/>
        {/* mid gentle hills — two soft rolling layers */}
        <path d="M0,600 Q240,565 500,590 Q760,615 1020,580 Q1280,550 1560,595 Q1760,620 1920,600 L1920,800 L0,800 Z"
          fill={tint(mid,0.25)}/>
        <path d="M0,650 Q280,625 580,650 Q880,675 1180,640 Q1480,610 1760,645 Q1880,660 1920,655 L1920,800 L0,800 Z"
          fill={mid}/>
        {/* near plain — open ground */}
        <path d="M0,720 Q480,708 960,715 Q1440,722 1920,712 L1920,800 L0,800 Z"
          fill="url(#heroGround)"/>
        {/* ground perspective lines */}
        <g stroke={shade(ground,0.35)} strokeWidth="1" opacity="0.15">
          <line x1="0" y1="740" x2="1920" y2="738"/>
          <line x1="0" y1="765" x2="1920" y2="762"/>
          <line x1="0" y1="790" x2="1920" y2="787"/>
        </g>
        {/* scattered distant trees — silhouettes, tiny, sparse */}
        <g fill={shade(mid,0.25)} opacity="0.75">
          {[140,310,420,690,880,1170,1380,1580,1820].map((x,i)=>(
            <g key={i} transform={`translate(${x},${640+((i*7)%10)})`}>
              <rect x="-0.5" y="0" width="1" height="8" fill={shade(mid,0.4)}/>
              <ellipse cx="0" cy="-2" rx={3+(i%3)} ry={4+(i%2)}/>
            </g>
          ))}
        </g>
        {/* a few mid-ground small trees */}
        <g className="hero-trees" fill={shade(mid,0.35)}>
          {[{x:200,s:1},{x:520,s:1.4},{x:1400,s:1.1},{x:1720,s:0.9}].map((t,i)=>(
            <g key={i} transform={`translate(${t.x},${682}) scale(${t.s})`}>
              <rect x="-1" y="0" width="2" height="14" fill={shade(mid,0.5)}/>
              <ellipse cx="0" cy="-3" rx="8" ry="11"/>
            </g>
          ))}
        </g>
      </svg>

      <Nav active="Home" accent={PALETTE.moss}/>

      <div style={{position:'absolute', left:72, top:200, maxWidth:900, zIndex:4}}>
        <Eyebrow num="00" label="Meet ComposerOS" tone={PALETTE.moss}/>
        <h1 style={{fontSize:100, lineHeight:0.92, letterSpacing:-4.4,
          fontWeight:450, margin:'21px 0 0', color:INK}}>
          <span className="os-only-desktop-break">The operating system</span><span className="os-only-mobile-break">The OS</span><br/>
          <span style={{fontStyle:'italic',fontWeight:350,color:shade(PALETTE.moss,0.1)}}>for composers.</span>
        </h1>
        <p style={{fontSize:20,lineHeight:1.5,width:1020,color:INK_SOFT,margin:'44px 0 0',padding:0}}>
          Your health. Your projects. Your cues. Your sessions.<span className="os-only-mobile-break"><br/></span> Your invoicing. Aria, your project-aware AI assistant.<span className="os-only-desktop-break"><br/></span><span className="os-only-mobile-break"><br/></span> Your hardware and software libraries and more, all in one place.
        </p>
        <div style={{display:'flex',gap:14,marginTop:36,alignItems:'center'}}>
          <div style={{minWidth:188,textAlign:'center',boxSizing:'border-box',padding:'18px 28px',background:INK,color:PAPER,borderRadius:999,fontSize:16,fontWeight:500,cursor:'pointer'}} onClick={()=>window.dispatchEvent(new CustomEvent('cos-open-waitlist',{detail:{accent:'#5f7d63'}}))}>
            Join the waitlist&nbsp; →
          </div>
          <div style={{minWidth:188,textAlign:'center',boxSizing:'border-box',padding:'18px 28px',background:'#5f7d63',color:'#fff',borderRadius:999,fontSize:16,fontWeight:500,cursor:'pointer'}} onClick={()=>window.dispatchEvent(new CustomEvent('cos-open-demo',{detail:{accent:'#5f7d63'}}))}>
            Book a demo
          </div>
        </div>
      </div>
      <div style={{position:'absolute',right:72,bottom:40,textAlign:'right',
        fontFamily:"'JetBrains Mono', monospace",fontSize:11,color:INK_MUTE,letterSpacing:1.5}}>
        VERSION 1.0 · APRIL MMXXVI<br/>
        <span style={{opacity:0.82}}>intelligent operating system for composers</span>
      </div>
    </Shell>
  );
}

// ═════════════════════════════════════════════════════════
// 01 — HOME
// Colors: coral (sky) + ochre (rock) + sage (ground)
// Composition: valley, warm morning
// ═════════════════════════════════════════════════════════
function HomeBanner({ tone = PALETTE.coral }) {
  // Flat yellow/orange morning palette — distinct from Hero's ochre.
  const sky     = '#eaf0d8';           // pale warm sky
  const skyTop  = '#f6f0d4';           // cream top
  const skyBot  = '#f2c37a';           // warm orange horizon
  const sunYel  = '#f7c948';           // bright yellow sun
  const rayYel  = '#f2b23a';           // slightly deeper yellow ray
  const raySharp= '#e88c3a';           // orange accent ray
  const mid     = PALETTE.moss;        // mountains stay moss green
  const ground  = PALETTE.sage;

  const SUN_X = 1350, SUN_Y = 360, SUN_R = 110;

  return (
    <Shell bg={skyTop}>
      <svg width="1920" height="800" viewBox="0 0 1920 800"
        preserveAspectRatio="xMidYMid slice"
        style={{position:'absolute',inset:0,display:'block'}}>
        <defs>
          <linearGradient id="homeSky" x1="0" y1="0" x2="0" y2="1">
            <stop offset="0" stopColor={skyTop}/>
            <stop offset="0.55" stopColor={sky}/>
            <stop offset="1" stopColor={skyBot}/>
          </linearGradient>
          <linearGradient id="homeGround" x1="0" y1="0" x2="0" y2="1">
            <stop offset="0" stopColor={tint(ground,0.25)}/>
            <stop offset="1" stopColor={shade(ground,0.2)}/>
          </linearGradient>
        </defs>

        {/* sky */}
        <rect width="1920" height="800" fill="url(#homeSky)"/>

        {/* HOME SUN — entire group rises with scroll (option A) */}
        <g className="home-sun-group">
        {/* Soft halo glow behind sun — pulses outward with scroll (option C) */}
        <circle className="home-sun-glow" cx={SUN_X} cy={SUN_Y} r={SUN_R + 220} fill={sunYel} opacity="0.10"/>
        <circle className="home-sun-glow-inner" cx={SUN_X} cy={SUN_Y} r={SUN_R + 60} fill={sunYel} opacity="0.20"/>

        {/* SQUARED RAYS — flat rectangles, no gradient */}
        {/* long orange accent rays (fewer, further, blocky) */}
        <g transform={`translate(${SUN_X} ${SUN_Y})`}>
          {Array.from({length:12}).map((_,i)=>{
            const angle = (i/12)*360;
            const len = 780;
            const w = 22;   // thick rectangular ray
            const gap = SUN_R + 22;
            return (
              <rect key={'o'+i}
                transform={`rotate(${angle})`}
                x={gap} y={-w/2}
                width={len-gap} height={w}
                fill={raySharp}
                opacity="0.55"
              />
            );
          })}
        </g>
        {/* main yellow squared rays */}
        <g transform={`translate(${SUN_X} ${SUN_Y})`}>
          {Array.from({length:12}).map((_,i)=>{
            const angle = (i/12)*360 + 15;
            const len = 540;
            const w = 16;
            const gap = SUN_R + 14;
            return (
              <rect key={'y'+i}
                transform={`rotate(${angle})`}
                x={gap} y={-w/2}
                width={len-gap} height={w}
                fill={rayYel}
              />
            );
          })}
        </g>
        {/* shorter bright yellow rays between them */}
        <g transform={`translate(${SUN_X} ${SUN_Y})`}>
          {Array.from({length:12}).map((_,i)=>{
            const angle = (i/12)*360 + 7.5;
            const len = 320;
            const w = 10;
            const gap = SUN_R + 10;
            return (
              <rect key={'y2'+i}
                transform={`rotate(${angle})`}
                x={gap} y={-w/2}
                width={len-gap} height={w}
                fill={sunYel}
              />
            );
          })}
        </g>

        {/* FLAT SUN — single solid yellow disc */}
        <circle cx={SUN_X} cy={SUN_Y} r={SUN_R} fill={sunYel}/>
        </g>
        {/* /home-sun-group */}

        {/* faint distant ridge */}
        <path d="M0,540 Q220,500 520,520 Q820,540 1140,510 Q1440,480 1740,520 Q1880,540 1920,525 L1920,620 L0,620 Z"
          fill={tint(mid,0.55)} opacity="0.4"/>

        {/* mountains — simple, 1-2 gentle curves, orange */}
        <path d="M0,620 Q560,380 1200,540 Q1640,640 1920,560 L1920,800 L0,800 Z"
          fill={shade(raySharp,0.15)}/>
        {/* second nearer range for depth — one curve */}
        <path d="M0,715 Q760,575 1920,675 L1920,800 L0,800 Z"
          fill={shade(raySharp,0.3)}/>

        {/* near foothills */}
        <path d="M0,680 Q300,650 620,675 Q940,700 1260,670 Q1580,640 1920,680 L1920,800 L0,800 Z"
          fill={shade(mid,0.28)}/>

        {/* ground */}
        <path d="M0,735 Q480,725 960,732 Q1440,740 1920,728 L1920,800 L0,800 Z"
          fill="url(#homeGround)"/>
        <g stroke={shade(ground,0.35)} strokeWidth="1" opacity="0.18">
          <line x1="0" y1="758" x2="1920" y2="755"/>
          <line x1="0" y1="780" x2="1920" y2="777"/>
        </g>

        {/* sparse distant trees */}
        <g fill={shade(mid,0.35)} opacity="0.7">
          {[120,260,410,690,960,1240,1520,1780].map((x,i)=>(
            <g key={i} transform={`translate(${x},${700+((i*5)%8)})`}>
              <rect x="-0.5" y="0" width="1" height="7" fill={shade(mid,0.45)}/>
              <ellipse cx="0" cy="-2" rx={2+(i%3)} ry={3+(i%2)}/>
            </g>
          ))}
        </g>
      </svg>

      <Nav active="Home" accent={sunYel}/>

      <div style={{position:'absolute',left:72,top:200,maxWidth:900,zIndex:4}}>
        <Eyebrow num="01" label="Home" tone={sunYel}/>
        <h2 style={{fontSize:100,lineHeight:0.94,letterSpacing:-3.2,fontWeight:450,margin:'21px 0 0',color:INK}}>
          Your creative day<br/>
          <span style={{fontStyle:'italic',fontWeight:350,color:raySharp}}>at a glance.</span>
        </h2>
        <p style={{fontSize:20,lineHeight:1.5,width:580,color:INK_SOFT,margin:'44px 0 0',padding:0}}>
          Cues. Sessions. Deadlines. Health. Weather. See your whole day. Start creating.
        </p>
        <div style={{display:'flex',gap:14,marginTop:36,alignItems:'center'}}>
          <div style={{minWidth:188,textAlign:'center',boxSizing:'border-box',padding:'18px 28px',background:INK,color:PAPER,borderRadius:999,fontSize:16,fontWeight:500,cursor:'pointer'}} onClick={()=>window.dispatchEvent(new CustomEvent('cos-open-waitlist',{detail:{accent:'#c08a2e'}}))}>
            Join the waitlist&nbsp; →
          </div>
          <div style={{minWidth:188,textAlign:'center',boxSizing:'border-box',padding:'18px 28px',background:'#c08a2e',color:'#fff',borderRadius:999,fontSize:16,fontWeight:500,cursor:'pointer'}} onClick={()=>window.dispatchEvent(new CustomEvent('cos-open-demo',{detail:{accent:'#c08a2e'}}))}>
            Book a demo
          </div>
        </div>
      </div>
    </Shell>
  );
}

// ═════════════════════════════════════════════════════════
// 02 — STUDIO
// Colors: plum (sky) + burgundy (rock) + terracotta (ground)
// Composition: alpine, dusk (dark mode)
// ═════════════════════════════════════════════════════════
function StudioBanner({ tone = PALETTE.plum }) {
  // Keep dusk palette: plum sky + burgundy rock + terracotta ground
  const sky     = PALETTE.plum;
  const skyTop  = shade(sky, 0.45);
  const skyMid  = shade(sky, 0.15);
  const skyBot  = tint(PALETTE.terracotta, 0.15);
  const rock    = PALETTE.burgundy;
  const ground  = PALETTE.terracotta;
  const accent  = PALETTE.terracotta;
  const moonCol = tint(PALETTE.terracotta, 0.5);

  return (
    <Shell bg={skyTop}>
      <svg width="1920" height="800" viewBox="0 0 1920 800"
        preserveAspectRatio="xMidYMid slice"
        style={{position:'absolute',inset:0,display:'block'}}>
        <defs>
          <linearGradient id="studioSky" x1="0" y1="0" x2="0" y2="1">
            <stop offset="0" stopColor={skyTop}/>
            <stop offset="0.55" stopColor={skyMid}/>
            <stop offset="1" stopColor={skyBot}/>
          </linearGradient>
          <linearGradient id="studioGround" x1="0" y1="0" x2="0" y2="1">
            <stop offset="0" stopColor={shade(ground,0.05)}/>
            <stop offset="1" stopColor={shade(ground,0.35)}/>
          </linearGradient>
        </defs>

        {/* dusk sky */}
        <rect width="1920" height="800" fill="url(#studioSky)"/>

        {/* STAR FIELD — scattered tiny stars in the upper sky */}
        <g fill={tint(sky,0.9)}>
          {[
            [120,90,1.4],[210,160,0.9],[320,70,1.1],[430,140,0.8],[540,110,1.3],
            [650,200,0.9],[760,80,1.2],[890,170,1.0],[1020,120,0.8],[1160,60,1.4],
            [1280,150,1.0],[1420,100,0.9],[1560,180,1.2],[1680,80,0.8],[1800,140,1.1],
            [80,220,0.7],[280,260,0.9],[470,230,1.0],[720,290,0.8],[960,240,1.1],
            [1200,260,0.8],[1480,230,1.0],[1720,270,0.9],[1860,210,1.1],
            [180,340,0.7],[560,360,0.8],[1080,340,0.9],[1620,330,0.8],
          ].map(([x,y,r],i)=> <circle key={i} cx={x} cy={y} r={r} opacity={0.55 + (i%3)*0.15}/>)}
        </g>

        {/* CRESCENT MOON — upper right */}
        <g transform="translate(1620 200)">
          <circle cx="0" cy="0" r="58" fill={moonCol} opacity="0.95"/>
          <circle cx="22" cy="-8" r="54" fill={skyMid}/>
          {/* soft halo */}
          <circle cx="0" cy="0" r="90" fill={moonCol} opacity="0.08"/>
        </g>

        {/* CONSTELLATION LINES — subtle connective arcs, evokes "your studio/system".
            Draws itself in as you scroll past — stroke-dashoffset animated by scroll triggers. */}
        <g stroke={tint(sky,0.7)} strokeWidth="1" opacity="0.35" fill="none">
          <path className="studio-constellation-1" d="M540,110 L650,200 L760,80 L890,170 L1020,120"
            pathLength="1" strokeDasharray="1" strokeDashoffset="1"/>
          <path className="studio-constellation-2" d="M1160,150 L1300,100 L1440,180"
            pathLength="1" strokeDasharray="1" strokeDashoffset="1"/>
        </g>
        <g fill={tint(sky,0.9)}>
          {[[540,110],[650,200],[760,80],[890,170],[1020,120],[1160,150],[1300,100],[1440,180]].map(([x,y],i)=>
            <circle key={'k'+i} cx={x} cy={y} r="2" opacity="0.85"/>
          )}
        </g>

        {/* LAYERED SILHOUETTE MOUNTAINS — sharper, dusk-lit edges.
            Each layer parallaxes at a different speed: far layer barely moves, near layer drifts most. */}
        {/* far layer — most washed, burgundy-tinted */}
        <path className="studio-mtn-far" d="M0,560 L180,430 L320,540 L470,380 L640,540 L820,400 L1020,540 L1200,420 L1400,540 L1580,440 L1760,540 L1920,460 L1920,800 L0,800 Z"
          fill={shade(rock,0.1)} opacity="0.65"/>
        {/* mid layer */}
        <path className="studio-mtn-mid" d="M0,650 L140,520 L320,640 L500,490 L700,640 L900,510 L1120,640 L1320,520 L1540,640 L1740,550 L1920,640 L1920,800 L0,800 Z"
          fill={shade(rock,0.25)}/>
        {/* near layer — darkest */}
        <path className="studio-mtn-near" d="M0,730 L240,640 L480,720 L740,620 L1000,720 L1260,640 L1520,725 L1760,640 L1920,715 L1920,800 L0,800 Z"
          fill={shade(rock,0.45)}/>

        {/* ground with warm dusk glow */}
        <path d="M0,770 L1920,760 L1920,800 L0,800 Z" fill="url(#studioGround)"/>
      </svg>

      <Nav active="Studio" onDark accent={accent}/>

      <div style={{position:'absolute',left:72,top:200,maxWidth:900,zIndex:4,color:PAPER}}>
        <Eyebrow num="02" label="Studio" tone={accent} onDark/>
        <h2 style={{fontSize:100,lineHeight:0.92,letterSpacing:-4.4,fontWeight:450,margin:'21px 0 0',color:PAPER}}>
          Where craft<br/>
          <span style={{fontStyle:'italic',fontWeight:350,color:tint(accent,0.3)}}>meets business.</span>
        </h2>
        <p style={{fontSize:20,lineHeight:1.5,width:580,color:'rgba(242,239,232,0.72)',margin:'44px 0 0',padding:0}}>
          Hardware. Software. Finances. Bookings. Subscriptions. Documents. Contacts. Everything connected, nothing lost.
        </p>
        <div style={{display:'flex',gap:14,marginTop:36,alignItems:'center'}}>
          <div style={{minWidth:188,textAlign:'center',boxSizing:'border-box',padding:'18px 28px',background:PAPER,color:INK,borderRadius:999,fontSize:16,fontWeight:500,cursor:'pointer'}} onClick={()=>window.dispatchEvent(new CustomEvent('cos-open-waitlist',{detail:{accent:'#b26f5c'}}))}>
            Join the waitlist&nbsp; →
          </div>
          <div style={{minWidth:188,textAlign:'center',boxSizing:'border-box',padding:'18px 28px',background:'#b26f5c',color:'#fff',borderRadius:999,fontSize:16,fontWeight:500,cursor:'pointer'}} onClick={()=>window.dispatchEvent(new CustomEvent('cos-open-demo',{detail:{accent:'#b26f5c'}}))}>
            Book a demo
          </div>
        </div>
      </div>
    </Shell>
  );
}

// ═════════════════════════════════════════════════════════
// 03 — LIBRARY
// Colors: teal (sky) + moss (rock) + sage (ground)
// Composition: coast, cool
// ═════════════════════════════════════════════════════════
function LibraryBanner({ tone = PALETTE.moss }) {
  // Warm intellectual archive — opposite end of the spectrum from dusk Studio.
  const paper   = '#eee3cc';               // warm parchment
  const paperHi = '#f4ead5';               // lighter top
  const paperLo = '#e3d3b3';               // warmer foot
  const bronze  = '#8a5a34';               // warm bronze
  const taupe   = '#9a7a5e';               // warm taupe
  const taupeLo = '#a89378';               // lighter taupe
  const sage    = '#8a9470';               // sage accent
  const sageDk  = '#6f7a58';
  const ink     = '#2a2218';               // warm near-black
  const hairline= 'rgba(42,34,24,0.12)';

  // shelf layout
  const shelves = [
    { y: 380, items: [
      {w:26,h:200,c:bronze},{w:22,h:220,c:taupe},{w:32,h:210,c:sageDk},
      {w:18,h:230,c:bronze},{w:28,h:200,c:taupeLo},{w:22,h:220,c:ink,tilt:-8},
      {w:36,h:210,c:sage},{w:24,h:230,c:bronze},{w:20,h:200,c:taupe},
      {w:30,h:220,c:sageDk},{w:16,h:210,c:bronze},{w:26,h:230,c:taupeLo},
    ]},
    { y: 620, items: [
      {w:22,h:180,c:taupeLo},{w:30,h:200,c:bronze},{w:20,h:210,c:sage},
      {w:26,h:190,c:ink,tilt:7},{w:18,h:210,c:taupe},{w:32,h:200,c:bronze},
      {w:22,h:220,c:sageDk},{w:28,h:200,c:taupeLo},{w:20,h:210,c:bronze},
      {w:34,h:200,c:sage},{w:18,h:210,c:taupe},{w:26,h:200,c:bronze},
      {w:22,h:220,c:ink},{w:30,h:210,c:sageDk},{w:20,h:200,c:taupeLo},
      {w:24,h:220,c:bronze},{w:28,h:210,c:sage},{w:20,h:200,c:taupe},
    ]},
  ];

  // Render book spines laid out across a shelf; right-anchored so they
  // fan in from the right side of the banner.
  const renderShelf = (sh, idx) => {
    const baseY = sh.y;
    let cursor = 1880; // right margin
    const books = sh.items.map((b, i) => {
      const x = cursor - b.w;
      cursor -= (b.w + 6);
      const hueVariant = i % 4 === 0;
      // leave a small patch empty to breathe, especially near text
      const drawable = x > 900;
      if (!drawable) return null;
      const tilt = b.tilt || 0;
      return (
        <g key={`s${idx}b${i}`} transform={`translate(${x} ${baseY - b.h}) rotate(${tilt} ${b.w/2} ${b.h})`}>
          <rect x="0" y="0" width={b.w} height={b.h} fill={b.c} rx="1.5"/>
          {/* top edge highlight */}
          <rect x="0" y="0" width={b.w} height="3" fill="rgba(255,255,255,0.18)"/>
          {/* bottom shadow band on spine */}
          <rect x="0" y={b.h-6} width={b.w} height="6" fill="rgba(0,0,0,0.22)"/>
          {/* gilt band */}
          {hueVariant && <rect x="2" y={b.h*0.35} width={b.w-4} height="2" fill="#c9a961" opacity="0.8"/>}
          {hueVariant && <rect x="2" y={b.h*0.35+8} width={b.w-4} height="1" fill="#c9a961" opacity="0.6"/>}
          {/* vertical title tick */}
          <rect x={b.w/2-0.5} y={b.h*0.18} width="1" height={b.h*0.55} fill="rgba(255,255,255,0.22)"/>
        </g>
      );
    });
    // books leaning stack (a small cluster laid down on the shelf)
    const leanX = 920;
    const leanStack = idx === 0 ? (
      <g transform={`translate(${leanX} ${baseY - 44})`}>
        <rect x="0"  y="0"  width="120" height="14" fill={taupe}/>
        <rect x="0"  y="0"  width="120" height="3"  fill="rgba(255,255,255,0.18)"/>
        <rect x="0"  y="11" width="120" height="3"  fill="rgba(0,0,0,0.22)"/>
        <rect x="4"  y="14" width="112" height="14" fill={bronze}/>
        <rect x="4"  y="14" width="112" height="3"  fill="rgba(255,255,255,0.18)"/>
        <rect x="4"  y="25" width="112" height="3"  fill="rgba(0,0,0,0.22)"/>
        <rect x="10" y="28" width="100" height="14" fill={ink}/>
        <rect x="10" y="28" width="100" height="3"  fill="rgba(255,255,255,0.15)"/>
        <rect x="10" y="39" width="100" height="3"  fill="rgba(0,0,0,0.25)"/>
      </g>
    ) : null;

    return (
      <g key={`shelf-${idx}`}>
        {/* shelf board */}
        <rect x="900" y={baseY} width="1020" height="10" fill={bronze}/>
        <rect x="900" y={baseY} width="1020" height="2"  fill="rgba(255,255,255,0.18)"/>
        <rect x="900" y={baseY+8} width="1020" height="2" fill="rgba(0,0,0,0.22)"/>
        {/* shadow under shelf */}
        <rect x="900" y={baseY+10} width="1020" height="6" fill="rgba(0,0,0,0.08)"/>
        {books}
        {leanStack}
      </g>
    );
  };

  return (
    <Shell bg={paperHi}>
      <svg width="1920" height="800" viewBox="0 0 1920 800"
        preserveAspectRatio="xMidYMid slice"
        style={{position:'absolute',inset:0,display:'block'}}>
        <defs>
          <linearGradient id="libBg" x1="0" y1="0" x2="0" y2="1">
            <stop offset="0" stopColor={paperHi}/>
            <stop offset="1" stopColor={paperLo}/>
          </linearGradient>
          <linearGradient id="libWall" x1="0" y1="0" x2="0" y2="1">
            <stop offset="0" stopColor={shade(paper,0.05)}/>
            <stop offset="1" stopColor={shade(paper,0.14)}/>
          </linearGradient>
        </defs>

        {/* warm parchment background */}
        <rect width="1920" height="800" fill="url(#libBg)"/>

        {/* right-side wall panel — subtle wash behind the shelves */}
        <rect x="880" y="0" width="1040" height="800" fill="url(#libWall)"/>
        {/* vertical hairlines to imply wood panel */}
        <g stroke={hairline} strokeWidth="1">
          {[1040, 1280, 1520, 1760].map((x,i)=>(
            <line key={i} x1={x} y1="40" x2={x} y2="760"/>
          ))}
        </g>

        {/* horizontal top rail */}
        <rect x="880" y="90" width="1040" height="4" fill={bronze} opacity="0.7"/>
        <rect x="880" y="94" width="1040" height="1" fill="rgba(0,0,0,0.2)"/>

        {/* small archway arc on left of the wall — suggests alcove */}
        <path d="M920,120 Q1400,60 1880,120" stroke={bronze} strokeWidth="1.5" fill="none" opacity="0.4"/>

        {/* SHELVES with books */}
        {shelves.map(renderShelf)}

        {/* warm light beam — like sunlight from an opening window, sweeps across the shelves */}
        <defs>
          <linearGradient id="libBeam" x1="0" y1="0" x2="1" y2="1">
            <stop offset="0" stopColor="#fff4d6" stopOpacity="0"/>
            <stop offset="0.3" stopColor="#fff0c8" stopOpacity="0.5"/>
            <stop offset="0.55" stopColor="#ffe9b0" stopOpacity="0.85"/>
            <stop offset="0.8" stopColor="#fff0c8" stopOpacity="0.5"/>
            <stop offset="1" stopColor="#fff4d6" stopOpacity="0"/>
          </linearGradient>
          <clipPath id="libBeamClip">
            <rect x="880" y="0" width="1040" height="800"/>
          </clipPath>
        </defs>
        <g clipPath="url(#libBeamClip)">
          <g className="library-light-beam" style={{opacity:0}}>
            {/* a tall slanted parallelogram of warm light, drawn over the shelves */}
            <polygon points="900,-100 1300,-100 1100,900 700,900" fill="url(#libBeam)"/>
            {/* a softer wider wash */}
            <polygon points="850,-100 1380,-100 1180,900 650,900" fill="url(#libBeam)" opacity="0.45"/>
          </g>
        </g>

        {/* floor line at bottom */}
        <rect x="0" y="770" width="1920" height="1" fill={hairline}/>

        {/* small decorative elements on top of upper shelf — vinyl disc only */}
        <g>
          {/* vinyl/disc on shelf */}
          <g transform="translate(1050 340)">
            <circle r="18" fill={ink}/>
            <circle r="6" fill={bronze}/>
            <circle r="1.5" fill={paperHi}/>
          </g>
        </g>

        {/* warm floor shadow on the left side — soft organic edge to let text breathe */}
        <ellipse cx="200" cy="770" rx="700" ry="18" fill="rgba(0,0,0,0.06)"/>
      </svg>

      <Nav active="Library" accent={bronze}/>

      <div style={{position:'absolute',left:72,top:200,maxWidth:900,zIndex:4}}>
        <Eyebrow num="03" label="Library" tone={bronze}/>
        <h2 style={{fontSize:100,lineHeight:0.92,letterSpacing:-4.4,fontWeight:450,margin:'21px 0 0',color:ink}}>
          The foundation<br/>
          <span style={{fontStyle:'italic',fontWeight:350,color:sageDk}}>of your art.</span>
        </h2>
        <p className="library-subhead" style={{fontSize:20,lineHeight:1.5,width:580,color:'rgba(42,34,24,0.65)',margin:'44px 0 0',padding:0}}>
          Books. PDFs. Sample Libraries. Music Catalog. Plugins. Courses. Podcasts. Your creative foundation, organized.
        </p>
        <div style={{display:'flex',gap:14,marginTop:36,alignItems:'center'}}>
          <div style={{minWidth:188,textAlign:'center',boxSizing:'border-box',padding:'18px 28px',background:ink,color:'#f4ead5',borderRadius:999,fontSize:16,fontWeight:500,cursor:'pointer'}} onClick={()=>window.dispatchEvent(new CustomEvent('cos-open-waitlist',{detail:{accent:'#8a5a34'}}))}>
            Join the waitlist&nbsp; →
          </div>
          <div style={{minWidth:188,textAlign:'center',boxSizing:'border-box',padding:'18px 28px',background:'#8a5a34',color:'#fff',borderRadius:999,fontSize:16,fontWeight:500,cursor:'pointer'}} onClick={()=>window.dispatchEvent(new CustomEvent('cos-open-demo',{detail:{accent:'#8a5a34'}}))}>
            Book a demo
          </div>
        </div>
      </div>
    </Shell>
  );
}

// ═════════════════════════════════════════════════════════
// 04 — PROJECTS
// Colors: steel (sky) + lavender (rock) + stone (ground)
// Composition: plateau, cool
// ═════════════════════════════════════════════════════════
function ProjectsBanner({ tone = PALETTE.steel }) {
  // Cool palette — lavender / steel / stone with a soft warm accent
  const skyTop   = '#e7e6ee';
  const skyBot   = '#c9c5d6';
  const rangeBack= shade(PALETTE.lavender, 0.05);
  const rangeFro = shade(PALETTE.steel,    0.1);
  const warm     = '#c0886a';
  const plum     = '#6b5d7a';   // icon/logo accent — sets Projects apart from the warm-brown sections
  const inkCool  = '#2b2838';
  const muted    = 'rgba(43,40,56,0.65)';
  const hair     = 'rgba(43,40,56,0.12)';

  return (
    <Shell bg={skyTop}>
      <svg width="1920" height="800" viewBox="0 0 1920 800"
        preserveAspectRatio="xMidYMid slice"
        style={{position:'absolute',inset:0,display:'block'}}>
        <defs>
          <linearGradient id="projSky" x1="0" y1="0" x2="0" y2="1">
            <stop offset="0" stopColor={skyTop}/>
            <stop offset="1" stopColor={skyBot}/>
          </linearGradient>
          <linearGradient id="projWarm" x1="0" y1="0" x2="0" y2="1">
            <stop offset="0" stopColor={tint(warm,0.15)}/>
            <stop offset="1" stopColor={warm}/>
          </linearGradient>
          {/* clip for shapes so they respect the back hill's curve */}
          <clipPath id="aboveBackHill">
            <path d="M0,0 L1920,0 L1920,620 Q1300,500 700,560 Q300,600 0,600 Z"/>
          </clipPath>
        </defs>

        {/* cool sky */}
        <rect width="1920" height="800" fill="url(#projSky)"/>

        {/* faint distant ridge — straight horizontal band */}
        <path d="M0,520 L1920,520 L1920,620 L0,620 Z"
          fill={tint(rangeBack,0.25)} opacity="0.45"/>

        {/* SUN-LIKE GEOMETRIC GROUP — squares in upper-right, clipped by back hill */}
        <g clipPath="url(#aboveBackHill)" className="projects-warm-squares">
          {/* faint large square, back layer */}
          <rect x="1220" y="130" width="360" height="360" fill={rangeBack} opacity="0.22"/>
          {/* medium warm square */}
          <rect x="1320" y="210" width="220" height="220" fill="url(#projWarm)" opacity="0.85"/>
          {/* small offset square overlapping */}
          <rect x="1480" y="170" width="130" height="130" fill={tint(warm,0.35)} opacity="0.75"/>
        </g>

        {/* gray near hill removed per request */}

        {/* back hill — straight diagonal line instead of wavy curve */}
        <path d="M0,540 L1920,660 L1920,800 L0,800 Z"
          fill={rangeBack}/>

        {/* geometric elements EMBEDDED in the back hill — right side only */}
        <g>
          {/* wide thin band skimming hill crest */}
          <rect x="1380" y="568" width="140" height="10" fill={shade(rangeBack,0.2)}/>
        </g>

        {/* warm squares on front plane */}
        <g className="projects-warm-squares-front">
          {/* mid-size warm square half-buried — front */}
          <rect x="1020" y="640" width="90" height="90" fill={warm} opacity="0.9"/>
          {/* single stacked square emerging */}
          <rect x="1228" y="637" width="56" height="56" fill={tint(warm,0.2)} opacity="0.85"/>
        </g>
      </svg>

      <Nav active="Projects" accent={plum}/>

      <div style={{position:'absolute',left:72,top:200,maxWidth:900,zIndex:4}}>
        <Eyebrow num="04" label="Projects" tone={warm}/>
        <h2 style={{fontSize:96,lineHeight:0.98,letterSpacing:-4.2,fontWeight:450,margin:'21px 0 0',color:inkCool}}>
          Projects organized.
          <span style={{display:'block',fontStyle:'italic',fontWeight:350,color:warm,marginTop:-2}}>Peace of mind.</span>
        </h2>
        <p className="projects-subhead" style={{fontSize:20,lineHeight:1.5,width:580,color:muted,margin:'44px 0 0',padding:0}}>
          From spotting to delivery. Cues. Sessions. Recordings. Timeline. Contacts. Tasks. Calendar. One project, complete.
        </p>
        <div style={{display:'flex',gap:14,marginTop:36,alignItems:'center'}}>
          <div style={{minWidth:188,textAlign:'center',boxSizing:'border-box',padding:'18px 28px',background:inkCool,color:'#f4ead5',borderRadius:999,fontSize:16,fontWeight:500,cursor:'pointer'}} onClick={()=>window.dispatchEvent(new CustomEvent('cos-open-waitlist',{detail:{accent:'#6b5d7a'}}))}>
            Join the waitlist&nbsp; →
          </div>
          <div style={{minWidth:188,textAlign:'center',boxSizing:'border-box',padding:'18px 28px',background:'#6b5d7a',color:'#fff',borderRadius:999,fontSize:16,fontWeight:500,cursor:'pointer'}} onClick={()=>window.dispatchEvent(new CustomEvent('cos-open-demo',{detail:{accent:'#6b5d7a'}}))}>
            Book a demo
          </div>
        </div>
      </div>
    </Shell>
  );
}

// ═════════════════════════════════════════════════════════
// 05 — HEALTH
// Sunset / sundown. Warm golds, soft oranges, deep purples, sage accent.
// Restorative, reflective. The creative pause.
// Same landscape / text system as Projects (04).
// ═════════════════════════════════════════════════════════
function HealthBanner({ tone = PALETTE.coral }) {
  // Sunset palette — warm gold sky fading to purple, sage ground accents
  const skyTop   = '#e9c9a3';                    // warm peach top
  const skyMid   = '#efb985';                    // golden orange band
  const skyBot   = '#b88ca6';                    // dusty mauve horizon
  const sunCol   = '#f0b268';                    // soft golden sun
  const sunGlow  = tint(sunCol, 0.3);
  const rangeBack= shade(PALETTE.plum, 0.25);    // deep purple mountain range
  const rangeFro = shade(PALETTE.burgundy, 0.2); // warm deep near range
  const groundCol= shade(PALETTE.moss, 0.35);    // sage evening ground
  const accent   = shade(PALETTE.moss, 0.15);    // sage accent for italic
  const inkWarm  = '#2a1f1a';
  const muted    = 'rgba(42,31,26,0.65)';
  const hair     = 'rgba(42,31,26,0.12)';

  return (
    <Shell bg={skyTop}>
      <svg width="1920" height="800" viewBox="0 0 1920 800"
        preserveAspectRatio="xMidYMid slice"
        style={{position:'absolute',inset:0,display:'block'}}>
        <defs>
          <linearGradient id="healthSky" x1="0" y1="0" x2="0" y2="1">
            <stop offset="0" stopColor={skyTop}/>
            <stop offset="0.45" stopColor={skyMid}/>
            <stop offset="1" stopColor={skyBot}/>
          </linearGradient>
          <linearGradient id="healthMtn" x1="0" y1="0" x2="0" y2="1">
            <stop offset="0" stopColor={tint(PALETTE.plum,0.25)}/>
            <stop offset="0.4" stopColor={tint(PALETTE.plum,0.1)}/>
            <stop offset="1" stopColor={shade(PALETTE.plum,0.25)}/>
          </linearGradient>
          {/* clip the sun so only the top peeks above the mountain range */}
          <clipPath id="aboveFarRangeHealth">
            <path d="M0,0 L1920,0 L1920,700 L1780,630 L1620,690 L1440,580 L1260,670 L1080,600 L900,680 L720,610 L540,670 L360,600 L180,660 L0,620 Z"/>
          </clipPath>
        </defs>

        {/* sunset sky */}
        <rect width="1920" height="800" fill="url(#healthSky)"/>

        {/* soft atmospheric haze bands across the horizon */}
        <rect x="0" y="470" width="1920" height="40" fill={tint(sunCol,0.25)} opacity="0.35"/>
        <rect x="0" y="510" width="1920" height="28" fill={tint(sunCol,0.15)} opacity="0.28"/>

        {/* SUN peeking above the ridge — half visible */}
        <g clipPath="url(#aboveFarRangeHealth)">
          <g className="health-sun-rise" style={{transformOrigin:'1460px 640px',transformBox:'fill-box'}}>
            <circle cx="1460" cy="640" r="240" fill={sunGlow} opacity="0.22"/>
            <circle cx="1460" cy="640" r="170" fill={sunGlow} opacity="0.3"/>
            <circle cx="1460" cy="640" r="130" fill={sunCol}/>
          </g>
        </g>

        {/* SINGLE mountain range — jagged angular peaks, sunset purple gradient */}
        <path d="M0,620 L180,660 L360,600 L540,670 L720,610 L900,680 L1080,600 L1260,670 L1440,580 L1620,690 L1780,630 L1920,700 L1920,800 L0,800 Z"
          fill="url(#healthMtn)"/>

        {/* PINE SILHOUETTES dotted across the ridge — evening stillness, sage */}
        <g fill={shade(accent,0.25)} opacity="0.9">
          {[
            {x:240,y:635,s:0.8},{x:400,y:620,s:1.0},{x:620,y:645,s:0.9},
            {x:1120,y:630,s:1.0},{x:1300,y:650,s:0.85},{x:1500,y:620,s:1.15},{x:1700,y:660,s:0.9}
          ].map((t,i)=>(
            <g key={i} transform={`translate(${t.x} ${t.y}) scale(${t.s})`}>
              <polygon points="0,-22 -7,0 7,0"/>
              <rect x="-1" y="0" width="2" height="5" fill={shade(accent,0.35)}/>
            </g>
          ))}
        </g>

        {/* ground */}
        <rect x="0" y="785" width="1920" height="15" fill={groundCol}/>
      </svg>

      <Nav active="Health" accent="#f0b268"/>

      <div style={{position:'absolute',left:72,top:200,maxWidth:900,zIndex:4}}>
        <Eyebrow num="05" label="Health" tone={accent}/>
        <h2 style={{fontSize:96,lineHeight:0.98,letterSpacing:-4.2,fontWeight:450,margin:'21px 0 0',color:inkWarm}}>
          Track your care,
          <span style={{display:'block',fontStyle:'italic',fontWeight:350,color:accent,marginTop:-2}}>balance creation.</span>
        </h2>
        <p style={{fontSize:20,lineHeight:1.5,width:580,color:muted,margin:'44px 0 0',padding:0}}>
          Sleep. Energy. Stress. Desk hours. Hearing health. Workload awareness. Your wellbeing, tracked and visible.
        </p>
        <div style={{display:'flex',gap:14,marginTop:36,alignItems:'center'}}>
          <div style={{minWidth:188,textAlign:'center',boxSizing:'border-box',padding:'18px 28px',background:inkWarm,color:'#f4ead5',borderRadius:999,fontSize:16,fontWeight:500,cursor:'pointer'}} onClick={()=>window.dispatchEvent(new CustomEvent('cos-open-waitlist',{detail:{accent:'#c4833d'}}))}>
            Join the waitlist&nbsp; →
          </div>
          <div style={{minWidth:188,textAlign:'center',boxSizing:'border-box',padding:'18px 28px',background:'#c4833d',color:'#fff',borderRadius:999,fontSize:16,fontWeight:500,cursor:'pointer'}} onClick={()=>window.dispatchEvent(new CustomEvent('cos-open-demo',{detail:{accent:'#c4833d'}}))}>
            Book a demo
          </div>
        </div>
      </div>
    </Shell>
  );
}

// ═════════════════════════════════════════════════════════
// 06 — ARIA
// Ethereal, minimalist, clarifying. Soft light, particles, clarity emerging.
// Soft yellows, whites, light grays. Air and light, not landscape.
// ═════════════════════════════════════════════════════════
function AriaBanner({ tone = PALETTE.ochre }) {
  const bg       = '#f5f1e6';                     // warm off-white
  const bgTop    = '#fbf8ef';                     // brighter at top
  const bgBot    = '#ebe6d7';                     // soft warm gray at bottom
  const lightRay = '#f3e4b8';                     // pale gold light
  const lightHot = '#f0d37a';                     // warmer light core
  const mistGray = '#dcd7c9';                     // soft warm gray mist
  const accent   = '#c9a34a';                     // quiet ochre accent
  const inkAir   = '#2b2821';
  const muted    = 'rgba(43,40,33,0.6)';
  const hair     = 'rgba(43,40,33,0.12)';

  return (
    <Shell bg={bgTop}>
      <svg width="1920" height="800" viewBox="0 0 1920 800"
        preserveAspectRatio="xMidYMid slice"
        style={{position:'absolute',inset:0,display:'block'}}>
        <defs>
          <linearGradient id="ariaBg" x1="0" y1="0" x2="0" y2="1">
            <stop offset="0" stopColor={bgTop}/>
            <stop offset="0.55" stopColor={bg}/>
            <stop offset="1" stopColor={bgBot}/>
          </linearGradient>
          <radialGradient id="ariaLight" cx="0.5" cy="0.35" r="0.7">
            <stop offset="0" stopColor={lightHot} stopOpacity="0.55"/>
            <stop offset="0.4" stopColor={lightRay} stopOpacity="0.35"/>
            <stop offset="1" stopColor={lightRay} stopOpacity="0"/>
          </radialGradient>
          <linearGradient id="ariaRay" x1="0" y1="0" x2="0" y2="1">
            <stop offset="0" stopColor={lightRay} stopOpacity="0.5"/>
            <stop offset="1" stopColor={lightRay} stopOpacity="0"/>
          </linearGradient>
        </defs>

        {/* warm off-white background */}
        <rect width="1920" height="800" fill="url(#ariaBg)"/>

        {/* BROAD SOFT LIGHT WASH — upper right, warm glow */}
        <g transform="translate(1400 260)">
          <ellipse cx="0" cy="0" rx="650" ry="450" fill="url(#ariaLight)"/>
        </g>

        {/* LIGHT RAYS — soft, angled, breaking through from upper right */}
        <g transform="translate(1500 60) rotate(18)" opacity="0.7">
          <rect x="-8"   y="0" width="16"  height="900" fill="url(#ariaRay)"/>
          <rect x="60"   y="0" width="8"   height="900" fill="url(#ariaRay)" opacity="0.7"/>
          <rect x="130"  y="0" width="20"  height="900" fill="url(#ariaRay)" opacity="0.5"/>
          <rect x="-80"  y="0" width="10"  height="900" fill="url(#ariaRay)" opacity="0.55"/>
          <rect x="-180" y="0" width="22"  height="900" fill="url(#ariaRay)" opacity="0.4"/>
          <rect x="-280" y="0" width="8"   height="900" fill="url(#ariaRay)" opacity="0.45"/>
          <rect x="220"  y="0" width="6"   height="900" fill="url(#ariaRay)" opacity="0.35"/>
        </g>

        {/* LOW MIST HORIZON — a soft wavy band near the bottom, very airy */}
        <path d="M0,640 Q480,620 960,635 Q1440,650 1920,630 L1920,720 Q1440,735 960,725 Q480,715 0,730 Z"
          fill={mistGray} opacity="0.35"/>
        <path d="M0,700 Q480,688 960,695 Q1440,702 1920,690 L1920,760 Q1440,770 960,765 Q480,760 0,770 Z"
          fill={mistGray} opacity="0.45"/>

        {/* CONCENTRIC ARCS — she listens, resonates.
            Quiet rings radiating outward from a small ochre core, floating in the upper right. */}
        <g className="aria-rings-group" transform="translate(1500 360)">
          {/* outermost softest arcs — each ring expands outward as you scroll */}
          <circle className="aria-ring" data-ring="0" cx="0" cy="0" r="440" fill="none" stroke={accent} strokeWidth="1"   opacity="0.06"/>
          <circle className="aria-ring" data-ring="1" cx="0" cy="0" r="360" fill="none" stroke={accent} strokeWidth="1"   opacity="0.09"/>
          <circle className="aria-ring" data-ring="2" cx="0" cy="0" r="280" fill="none" stroke={accent} strokeWidth="1"   opacity="0.14"/>
          <circle className="aria-ring" data-ring="3" cx="0" cy="0" r="210" fill="none" stroke={accent} strokeWidth="1"   opacity="0.20"/>
          <circle className="aria-ring" data-ring="4" cx="0" cy="0" r="150" fill="none" stroke={accent} strokeWidth="1.1" opacity="0.28"/>
          <circle className="aria-ring" data-ring="5" cx="0" cy="0" r="100" fill="none" stroke={accent} strokeWidth="1.1" opacity="0.36"/>
          <circle className="aria-ring" data-ring="6" cx="0" cy="0" r="60"  fill="none" stroke={accent} strokeWidth="1.2" opacity="0.45"/>
          {/* soft halo glow behind the core */}
          <circle cx="0" cy="0" r="42" fill={lightHot} opacity="0.28"/>
          {/* the core — small, clear, ochre */}
          <circle cx="0" cy="0" r="11" fill={accent} opacity="0.85"/>
        </g>

        {/* PARTICLES / DUST MOTES floating in the light — right side only, sparse */}
        <g fill={accent}>
          {[
            [1120,180,1.6,0.35],[1260,240,2.2,0.45],[1380,160,1.2,0.3],
            [1500,220,1.8,0.4],[1620,300,2.0,0.5],[1760,180,1.4,0.3],
            [1340,340,1.6,0.35],[1480,380,1.2,0.3],[1620,420,2.4,0.55],
            [1180,320,1.4,0.3],[1720,260,1.6,0.35],[1300,500,1.2,0.3],
            [1560,140,1.8,0.4],[1840,360,1.4,0.3],[1100,280,1.2,0.28],
            [1240,440,2.0,0.45],[1780,440,1.6,0.35],[1460,280,1.4,0.3],
            [1680,500,1.2,0.3],[1820,240,1.8,0.4],
          ].map(([x,y,r,o],i)=>
            <circle key={i} cx={x} cy={y} r={r} opacity={o}/>
          )}
        </g>

        {/* even subtler particles further scattered */}
        <g fill={mistGray}>
          {[
            [1040,200,1.2,0.4],[1160,380,1.4,0.35],[1320,260,1.0,0.35],
            [1520,340,1.2,0.35],[1700,140,1.0,0.3],[1880,300,1.2,0.35],
          ].map(([x,y,r,o],i)=>
            <circle key={i} cx={x} cy={y} r={r} opacity={o}/>
          )}
        </g>

        {/* very faint horizontal hairline — the quiet horizon */}
        <line x1="0" y1="660" x2="1920" y2="660" stroke={hair} strokeWidth="1"/>
      </svg>

      <Nav active="Aria" accent={accent}/>

      <div style={{position:'absolute',left:72,top:188,width:1050,zIndex:4}}>
        <Eyebrow num="06" label="Aria" tone={accent}/>
        <h2 style={{fontSize:96,lineHeight:1.02,letterSpacing:-4.2,fontWeight:450,margin:'21px 0 0',color:inkAir,whiteSpace:'nowrap'}}>
          Creative momentum.
          <span style={{display:'block',fontStyle:'italic',fontWeight:350,color:accent}}>Protected.</span>
        </h2>
        <p className="aria-subhead" style={{fontSize:20,lineHeight:1.5,width:1080,color:muted,margin:'44px 0 0',padding:0}}>
          Drop spotting notes. Aria turns them into cues. She reads contracts. She knows your project. She keeps you on track. Your creative work, protected.
        </p>
        <div style={{display:'flex',gap:14,marginTop:36,alignItems:'center'}}>
          <div style={{minWidth:188,textAlign:'center',boxSizing:'border-box',padding:'18px 28px',background:inkAir,color:'#f4ead5',borderRadius:999,fontSize:16,fontWeight:500,cursor:'pointer'}} onClick={()=>window.dispatchEvent(new CustomEvent('cos-open-waitlist',{detail:{accent:'#b18a2f'}}))}>
            Join the waitlist&nbsp; →
          </div>
          <div style={{minWidth:188,textAlign:'center',boxSizing:'border-box',padding:'18px 28px',background:'#b18a2f',color:'#fff',borderRadius:999,fontSize:16,fontWeight:500,cursor:'pointer'}} onClick={()=>window.dispatchEvent(new CustomEvent('cos-open-demo',{detail:{accent:'#b18a2f'}}))}>
            Book a demo
          </div>
        </div>
      </div>
    </Shell>
  );
}

Object.assign(window, {
  PALETTE,
  HeroBanner,
  HomeBanner,
  StudioBanner,
  LibraryBanner,
  ProjectsBanner,
  HealthBanner,
  AriaBanner,
});
